#include "TestBoard.h"
#include "cs315.h"
#include <stdio.h>
#include <stdlib.h>
#include <iostream>


void TestBoard::printBoard()
{
	for(x=0;x<10;x++)
		{	
		for(y=0;y<10;y++)
			{
			board [x][y] = FREE;
			}
		}
	std::cout << "";
	for (int i=0;i<10;i++)
		{
		
		std::cout << " " << i ;//y grid 0-9
		}
	std::cout << std::endl;
	std::cout << "  ";
	for (int k=0;k<20;k++)
		{
		std::cout << "-";//y grid "------"
		}
	std::cout << std::endl;
	for (row=0; row<10; row++) 
		{	
		
		for (column=1;column<10;column++)
			{
			std::cout << column << "|" << std::endl;
			}

		for (column=1; column<10; column++)
			{
			 if(board [x][y] == FREE)
				{
				std::cout << " ";
				} else 
			if(board [x][y] == SHIP)
				{
				std::cout << "++";
				} else
			if(board [x][y] == HIT)
				{
				std::cout << "**";
				} else
			if(board [x][y] == MISS)
				{
				std::cout <<"..";
				}
			}
		for(row=1; row <10; row++)	
			{
			if(board [x][y] == FREE)
				{
				std::cout << "  ";
				} else 
			if(board [x][y] == SHIP)
				{
				std::cout << "++";
				} else
			if(board [x][y] == HIT)
				{
				std::cout << "**";
				} else
			if(board [x][y] == MISS)
				{
				std::cout <<"..";
				} 
				std::cout << std::endl;
				}
			}
			std::cout << std::endl;
}

TestBoard::TestBoard()
{
}


TestBoard::~TestBoard()
{

}

